package com.crane.common.core.dto;

import java.io.Serializable;

/**
 * @author zhenxing.pi
 */
public class PageQuery implements Serializable {

    private static final long serialVersionUID = 1L;

    protected int pageNo = 1;

    protected int pageSize = 10;

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getOffset() {
        return pageNo > 0 ? (pageNo - 1) * pageSize : 0;
    }

}
